﻿<%@ Page Title="" Language="C#" MasterPageFile="~/AdminCP/admincp.Master" AutoEventWireup="true"
    CodeBehind="ListArticle.aspx.cs" Inherits="SES.CMS.AdminCP.ListArticle" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <h2>
        Danh sách Tin tức</h2>
    <div style="width: 90%; float: left; margin-bottom: 30px;">
        Lựa chọn theo Danh mục:
        <asp:DropDownList ID="cboCategory" CssClass="ddl-input" Width="250px" runat="server"
            AutoPostBack="True" OnSelectedIndexChanged="cboCategory_SelectedIndexChanged"
            AppendDataBoundItems="true">
            <asp:ListItem Value="0" Text=".: Chọn toàn bộ :."></asp:ListItem>
        </asp:DropDownList>
    </div>
    <div style="float: left; width: 100%;">
        <asp:GridView ID="gvAt" DataKeyNames="ArticleID" runat="server" AutoGenerateColumns="False"
            OnRowDeleting="gvAt_RowDeleting" OnSelectedIndexChanged="gvAt_SelectedIndexChanged"
            PageSize="50" CssClass="tstyle2" Width="100%" PagerStyle-CssClass="pgr" AllowPaging="true"
            OnPageIndexChanged="gvAt_PageIndexChanged" OnPageIndexChanging="gvAt_PageIndexChanging">
            <Columns>
                <asp:BoundField DataField="STT" HeaderText="STT" ReadOnly="True" SortExpression="STT"
                    Visible="false" />
                <asp:BoundField DataField="Title" HeaderText="Tiêu đề" SortExpression="Title" ItemStyle-Width="50%" />
                <asp:BoundField DataField="CategoryName" HeaderText="Danh mục" SortExpression="CategoryName"
                    ItemStyle-Width="15%" />
                <asp:BoundField DataField="Username" HeaderText="Người tạo" SortExpression="Username" ItemStyle-Width="13%" ItemStyle-HorizontalAlign="Center">
                    
                </asp:BoundField>
                <asp:CheckBoxField DataField="IsPublish" HeaderText="Trang chủ" ItemStyle-Width="7%" Visible="false" />
                <asp:CheckBoxField DataField="IsHompage" HeaderText="Trang chủ" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Center">
                    <HeaderStyle HorizontalAlign="Center" />
                </asp:CheckBoxField>

                <asp:TemplateField ItemStyle-Width="13%" HeaderText="Thao tác" ItemStyle-HorizontalAlign="Center">
                    <ItemTemplate>
                        <asp:ImageButton ID="btEdit" runat="server" CommandName="Select" ImageUrl="~/AdminCP/images/edit_16x16.gif" />
                        <asp:ImageButton ID="btDelete" runat="server" CommandArgument='<%#Eval("ArticleID") %>'
                            CommandName="Delete" ImageUrl="~/AdminCP/images/delete_16x16.gif" OnClientClick="return confirm('Có muốn xóa bản ghi này? Nhấn OK để xóa!')" />
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
        </asp:GridView>
        <br />
        <asp:Button CssClass="button-gg-green" ID="btnAdd" runat="server" OnClick="btnAdd_Click" Text="Thêm mới" />
    </div>
</asp:Content>
